<div class="tableinfo">
    <div class="tableHeader">
        <p>Danh Sách Đề Án</p>
    </div>
    
    
    <table border ="0" cellspacing ="0" cellpadding ="0">
        <tr style="background: silver; font-weight: bold;">
         
            <td>Mã đề án</td>
            <td>Tên Đề Án</td>
            <td>Địa Điểm Đề Án</td>
            <td>Mã Phòng</td>
            <td >Ghi Chú</td>
            <td>Sửa TT</td>
                
        </tr>
        
        <?php 
            include "../controller/load_dean.php";
            
            while ($row = mysql_fetch_assoc($dean)){
               
            //for($l = 1; $l<=15; $l++){
            echo " <tr>
         
            <td>".$row['MaDA']."</td>
            <td>".$row['TenDA']."</td>
            <td>".$row['DDiemDA']."</td>
            <td>".$row['MaPhong']."</td>
            <td>".$row['GhiChu']."</td>
            <td align='center'><a href='../controller/load_frm_capnhat_dean.php?madean=".$row['MaDA']."'title='Chỉnh Sửa Thông Tin'><img src='../images/edit_icon.png' alt='Chỉnh Sửa' /></a></td>

            </tr>" ;
            //}
            }
            
        ?>
    </table>
    <div class="taomoi">
        <a href="../controller/load_frm_taomoi_dean.php"><img src="../images/new_icon.png" />Thêm đề án mới</a>
        
        <ul class="phantrang">
            <?php
               //echo $so; 
              if($page >1){
                $sau = $vitri + $hienthi;
                $truoc = $vitri - $hienthi;
                $tranght= ($vitri/$hienthi)+1;

                //nut pre                
                if($tranght !=1){
                    echo "<li><a href='../admin/dean.php?vitri=".$truoc."'>Trước</a></li>";
                }
                
                //so trang
                for($i=1; $i<=$page; $i++ ){
                    if($tranght != $i){
                        echo "<li><a href='../admin/dean.php?vitri=".$hienthi*($i-1)."'>$i</a></li>"; 
                    }else{
                        echo "<li class='hientai'><a href=''>$i</a></li>";
                    } 
                }
                
                
                //nut next
                if($tranght != $page){
                    echo "<li><a href='../admin/dean.php?vitri=".$sau."'>Sau</a></li>";
                }
              }  
            ?>
             
        </ul>
    
    </div>

</div>
